<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>企业管理系统</title>
<meta name="renderer" content="webkit"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <link rel="stylesheet" href="layui/css/layui.css" media="all"/>
    <script src="layui/layui.js"></script>
    <!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- jQuery -->
<script src="../plugins/jquery/jquery.min.js"></script>
<script src="js/ajax.js"></script>
  <script>
    //依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;
    });
</script>
  <link rel="stylesheet" href="/layui/a.css"  media="all"/>
  <link rel="stylesheet" href="/layui/b.css" media="all"/>
</head>
<body>
<div class="layui-layout layui-layout-admin">
<div class="layui-header header header-demo">
  <div class="layui-main">
    <a class="logo" href="/">
      <img src="/layui/logo.png" alt="layui"/>
    </a>
    <div class="layui-form component" lay-filter="LAY-site-header-component"></div>
    <ul class="layui-nav">
      <li class="layui-nav-item ">
        <a href="http://qygl.gxkaijie.cn/">旧版系统<!-- <span class="layui-badge-dot"></span> --></a> 
      </li>
      <li class="layui-nav-item">
        <a href="javascript:;"><!--<span class="layui-badge-dot" style="left:0; right: auto; margin: -4px 0 0 5px;"></span>--> 周边</a>
        <dl class="layui-nav-child" style="left: auto; right: -22px; text-align: center;">
          <dd>
            <a href="//fly.layui.com/user/" target="_blank">用户中心 <span class="layui-badge-dot" style="margin-top: -5px;"></span></a>
          </dd>
          <dd>
            <a href="https://gitee.com/sentsin/layui/issues" target="_blank" rel="nofollow">问题反馈</a>
            <hr/>
          </dd>
          <dd><a href="/admin/" target="_blank">后台模板 <span class="layui-badge-dot" style="margin-top: -5px;"></span></a></dd>
          <dd><a href="/layim/" target="_blank">即时聊天</a><hr/></dd>
          
          <dd><a href="/alone.html" target="_blank">独立组件</a></dd>
          <dd><a href="//fly.layui.com/extend/" target="_blank">扩展组件</a><hr/></dd>
          
          <dd>
            <a href="https://www.layuicdn.com/?from=layui" target="_blank" id="layui-spm-event-layuicdn" rel="nofollow">
              layui cdn
            </a>
          </dd>
          <dd>
            <a href="https://fly.layui.com/jump/alyhot/" target="_blank" id="layui-spm-event-aliyun" style="color: #FF6A00;">阿里云特惠 <span class="layui-badge-dot" style="margin-top: -5px;"></span></a>
          </dd>
        </dl>
      </li>
      
      
     
      <li class="layui-nav-item layui-hide-xs">
        <a href="" target="_blank">退出登录 <span class="layui-badge-dot" style="margin-top: -5px;"></span></a>
      </li>
    </ul>
  </div>
</div>
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      
<ul class="layui-nav layui-nav-tree site-demo-nav">
  
  <li class="layui-nav-item layui-nav-itemed">
    <a class="javascript:;" href="javascript:;">原料系统</a>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="addmate.html">原料制单</a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd>
        <a href="matecon.html">原料管理</a>
      </dd>
    </dl>
  </li>
  
  <li class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">货单系统</a>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="addsell.html">货单制单</a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="sellcon.html">货单管理</a>
      </dd>
    </dl>
  </li>
  
  <li class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">库存系统</a>
    <dl class="layui-nav-child">
      <dd>
        <a href="stock.html">库存制单</a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="stockGL.html">库存管理</a>
      </dd>
    </dl>
  </li>
  
  <li class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">货款系统</a>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="paycom.html">
          货款制单
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="paycomGL.html">
          货款管理
        </a>
      </dd>
    </dl>
  </li>
<li class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">资金系统</a>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="income.html">
          收入制单
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="incomeGL.html">
          收入管理
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="expend.html">
          支出制单
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="expendGL.html">
          支出管理
        </a>
      </dd>
    </dl>
  </li>
  <li class="layui-nav-item layui-nav-itemed">
    <a class="javascript:;" href="javascript:;">统计报表</a>
    <dl class="layui-nav-child">
      <dd class="layui-this">
        <a href="mateTJ.html">
          原料统计
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="huodanTJ.html">
          货单统计
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="incomeTJ.html">
          收入统计
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="expendTJ.html">
          支出统计
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="qiankuanTJ.html">
          欠款统计
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="kucunTJ.html">
          库存统计
        </a>
      </dd>
    </dl>
  </li>
  <li class="layui-nav-item">
    <a class="javascript:;" href="javascript:;">用户</a>
    <dl class="layui-nav-child">
      <dd class="">
       <a href="adduser.html">
          添加用户
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
         <a href="userGL.html">
          用户管理
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="updatepawod.html">
          修改密码
        </a>
      </dd>
    </dl>
    <dl class="layui-nav-child">
      <dd class="">
        <a href="outline.html">
          注销
        </a>
      </dd>
    </dl>
  </li>
  
  <li class="layui-nav-item" style="height: 30px; text-align: center"></li>
</ul>

    </div>
  </div>
  <div class="layui-tab layui-tab-brief" lay-filter="demoTitle">
    <div class="layui-body layui-tab-content site-demo site-demo-body">
    
    
      <div class="layui-tab-item layui-show">
        <div class="layui-main">
          <div id="LAY_preview">
              
  
<script type="text/javascript" src="../js/TJ.js"></script> 
<script src="../js/echarts.min.js"></script>           
<script>


function zhzs(value) {
	   value = value.replace(/[^\d]/g, '').replace(/^0{1,}/g, '');
	   if (value != '')
	      value = parseFloat(value);//.toFixed(3);//小数点
	   else
	      value = parseFloat(0);//.toFixed(3);
	   return value;
	}
</script>   
	<div class="layui-form">
		<form action="">
			<div class="layui-form-item">
				<span style="margin-left: 20px; font-size: 15px; margin-right: 10px;">名称</span>
				<div class="layui-inline">
					<input class="layui-input" name="compname" id="compname" autocomplete="off" placeholder="请输入名称">
				</div>
				<span style="margin-left: 20px; font-size: 15px; margin-right: 10px;">类型</span>
				<div class="layui-inline">
					<input class="layui-input" name="grade" id="grade" autocomplete="off" placeholder="请输入类型">
				</div>
				<span style="margin-left: 20px; font-size: 15px; margin-right: 10px;">型号</span>
				<div class="layui-inline">
					<input class="layui-input" name="grade" id="grade" autocomplete="off" placeholder="请输入型号">
				</div>
				<span style="margin-left: 20px; font-size: 15px; margin-right: 10px;">时间段</span>
				<div class="layui-inline">
					<input class="layui-input" id="test6" autocomplete="off" placeholder=" - ">
				</div>
				<!-- <div class="layui-inline">
					<div class="layui-input-inline">
						<select name="classes" id="classes" lay-verify="" lay-search>
							<option value="">请选择班级</option>
						</select>
					</div>
				</div> -->
				<div class="layui-inline">
					<div class="layui-input-inline">
						<button class="layui-btn" id="searchBtn" lay-submit
							lay-filter="formDemo" style="margin-left: 5px">
							<i class="layui-icon layui-icon-search"></i> 查询
						</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</div>
		</form>
	</div>
	<div style="padding: 20px;">
		<div class="layui-row layui-col-space15">
			<div class="layui-col-md12">
				<div class="layui-card"
					style="border-radius: 20px; border: 2px solid buttonface; box-shadow: 5px 5px 5px #F2F2F2 inset;">
					<div class="layui-card-header"
						style="font-weight: bolder; font-size: 20px; height: 60px">
						<span style="line-height: 60px">原料统计</span>
					</div>
					<div class="layui-card-body">
						<div class="layui-row layui-col-space15">
							<div style="height: 15px;"></div>
							<div class="layui-col-md6">
								<div class="layui-card"
									style="box-shadow: darkgrey 0px 0px 10px 3px; border-radius: 20px;">
									<div class="layui-card-header"
										style="font-weight: bold; font-size: 18px;">**统计</div>
									<div class="layui-card-body">
										<div id="pienum" style="width: 100%; height: 400px;"></div>
									</div>
								</div>
							</div>
							<div class="layui-col-md6">
								<div class="layui-card"
									style="box-shadow: darkgrey 0px 0px 10px 3px; border-radius: 20px;">
									<div class="layui-card-header"
										style="font-weight: bold; font-size: 18px;">**统计</div>
									<div class="layui-card-body">
										<div id="piewin" style="width: 100%; height: 400px;"></div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="layui-form">
		<form action="">
			<div class="layui-form-item">
				<br> <span
					style="margin-left: 30px; font-size: 20px; margin-right: 10px;">年度**对比:</span>
				<div class="layui-inline">
					<input class="layui-input" name="compname1" id="compname1"
						autocomplete="off" placeholder="请输入名称">
				</div>
				<div class="layui-inline">
					<div class="layui-input-inline">
						<input type="text" name="begintime" id="begintime"
							placeholder="起始时间" autocomplete="off" class="layui-input">
					</div>
					<div class="layui-form-mid">-</div>
					<div class="layui-input-inline">
						<input type="text" name="endtime" id="endtime" placeholder="结束时间"
							autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<div class="layui-input-inline">
						<button class="layui-btn" id="searchBtn2" lay-submit
							lay-filter="formDemo2" style="margin-left: 15px">
							<i class="layui-icon layui-icon-search"></i> 查询
						</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</div>
		</form>
	</div>
	<div style="padding: 20px;">
		<div class="layui-row layui-col-space15">
			<div class="layui-card"
				style="border-radius: 20px; border: 2px solid buttonface; box-shadow: 5px 5px 5px #F2F2F2 inset;">
				<div class="layui-card-header"
					style="font-weight: bold; font-size: 18px;">各****比较</div>
				<div class="layui-card-body">
					<div id="chartyear" style="width: 100%; height: 400px;"></div>
				</div>
			</div>
		</div>
	</div>
  </div>
  </div>
  </div>
  </div>
  </div>
  <div class="layui-footer footer footer-demo">
  <div class="layui-main">
    <p>
      Build By 广西海德塑料有限责任公司
    </p>
  </div>
</div>
</div>
<div id="LAY_democodejs">
<script>
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  
  //日期
  laydate.render({
    elem: '#date',
    type: 'datetime'
  });

	var url = location.search;  
	if (url.indexOf("?") != -1) {
	  var str = url.substr(1);      
	}
	 if(url!=null&&url!="")
	$.ajax({
		url:"Sp/selestockbyid",
		type:"get",
		data:{"id":str},
		dataType:"",
		success:function(a){
			//表单赋值
		    form.val('example', {
		      "id": a.id
		      ,"modele": a.modele
		      ,"weight": a.weight
		      ,"wall": a.wall
		      ,"colour": a.colour 
		      ,"quantite": a.quantite 
		      ,"time": a.time
			  ,"saisie": a.saisie
		      ,"faf": "up"
		    });				
		},
		error:function(){
			if(str==null||str==""){
				
			}else
			alert("发生异常");
		}
	})
	  //监听提交
	   form.on('submit(demo1)', function(data){
		   $.ajax({
				url:"Sp/addstock",
				type:"post",
				data:data.field,
				dataType:"",
				success:function(a){
					layer.alert(a);
				},
				error:function(){
					alert("发生异常");
				}
			})
	    return false;
	  });  
	
});
</script>
</div>
</body>
</html>